package com.software.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author wyj
 * @since 2024-03-07
 */
@Data
@TableName(value = "tb_category"  )
public class CategoryBean implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 父目录 一级目录 parent_id 为空 
     */
    @TableField("parent_id")
    private Integer parentId;

    /**
     * 名称
     */
    @TableField("name")
    private String name;

    /**
     * 等级 1级2级3级 
     */
    @TableField("level")
    private Integer level;

    /**
     * icon url
     */
    @TableField("icon_url")
    private String iconUrl;


    /**
     * 是否主页显示 1 显示 0 不显示
     */
    @TableField("is_home")
    private Integer isHome;

    /**
     * 逻辑删除 1 有效0无效
     */
    @TableField("status")
    private Integer status;


    // 创建
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;

    //更新
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;


}
